package luj.game.robot.internal.start.listener;

import luj.cluster.api.actor.Tellable;
import luj.game.robot.api.boot.RobotStartListener;
import luj.game.robot.internal.instance.config.BotConf;
import luj.game.robot.internal.net.http.collect.HandleMap;
import luj.game.robot.internal.start.botgroup.BotGroupCreator;

import java.util.List;

final class StartContextImpl implements RobotStartListener.Context {

  @Deprecated
  @Override
  public void createRobot(List<BotConf> conf) {
    for (BotConf c : conf) {
      new BotGroupCreator(c, _bossRef).create();
    }
  }

  @Override
  public RobotStartListener.Internal getInternal() {
    var internal = new InternalImpl();
    internal._startCtx = this;

    return internal;
  }

  Tellable _bossRef;

  Tellable _adminRef;
  HandleMap _httpHandleMap;
}
